package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;
import java.util.Objects;

@Entity
/*
* 退换货维修
* */
public class Wxgdtuihuan {
    private int gd2Id;//工单id
    private String gd2Hao;//工单号
    private String gd2People;//接单人
    private Timestamp gd2Time;//接单时间
    private String gd2Thhh;//退货/换货
    private Integer gd2Thhhid;//退货id/换货id
    private String gd2Miaoshu;//工单描述
    private String gd2Zhuyishixiang;//注意事项
    private Dept dept;//部门
    private String gd2Zhuangtai;//工单状态
    private String gd2Beizhu;//工单备注

    private List<Wxgdtuihuanxiangqin> wxgdtuihuanxiangqinList;

    private Integer gd2Rk;//判断是否入库了（0=>没有，1=>已申请,2=>已入库）
    private Integer gd2Wx;//判断是否维修完成(0=>没有,1=>维修成功,2=>维修失败)
    private Timestamp gd2Wctime;//维修完成时间(操作的时间)

    @Column(name = "gd2_wctime")
    public Timestamp getGd2Wctime() {
        return gd2Wctime;
    }

    public void setGd2Wctime(Timestamp gd2Wctime) {
        this.gd2Wctime = gd2Wctime;
    }

    @Column(name = "gd2_rk")
    public Integer getGd2Rk() {
        return gd2Rk;
    }

    public void setGd2Rk(Integer gd2Rk) {
        this.gd2Rk = gd2Rk;
    }

    @Column(name = "gd2_wx")
    public Integer getGd2Wx() {
        return gd2Wx;
    }

    public void setGd2Wx(Integer gd2Wx) {
        this.gd2Wx = gd2Wx;
    }

    @Id
    @Column(name = "gd2_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getGd2Id() {
        return gd2Id;
    }

    public void setGd2Id(int gd2Id) {
        this.gd2Id = gd2Id;
    }

    @Basic
    @Column(name = "gd2_hao", nullable = true, length = 200)
    public String getGd2Hao() {
        return gd2Hao;
    }

    public void setGd2Hao(String gd2Hao) {
        this.gd2Hao = gd2Hao;
    }

    @Basic
    @Column(name = "gd2_people", nullable = true, length = 200)
    public String getGd2People() {
        return gd2People;
    }

    public void setGd2People(String gd2People) {
        this.gd2People = gd2People;
    }

    @Basic
    @Column(name = "gd2_time", nullable = true)
    public Timestamp getGd2Time() {
        return gd2Time;
    }

    public void setGd2Time(Timestamp gd2Time) {
        this.gd2Time = gd2Time;
    }

    @Basic
    @Column(name = "gd2_thhh", nullable = true, length = 200)
    public String getGd2Thhh() {
        return gd2Thhh;
    }

    public void setGd2Thhh(String gd2Thhh) {
        this.gd2Thhh = gd2Thhh;
    }

    @Basic
    @Column(name = "gd2_thhhid", nullable = true)
    public Integer getGd2Thhhid() {
        return gd2Thhhid;
    }

    public void setGd2Thhhid(Integer gd2Thhhid) {
        this.gd2Thhhid = gd2Thhhid;
    }

    @Basic
    @Column(name = "gd2_miaoshu", nullable = true, length = 200)
    public String getGd2Miaoshu() {
        return gd2Miaoshu;
    }

    public void setGd2Miaoshu(String gd2Miaoshu) {
        this.gd2Miaoshu = gd2Miaoshu;
    }

    @Basic
    @Column(name = "gd2_zhuyishixiang", nullable = true, length = 200)
    public String getGd2Zhuyishixiang() {
        return gd2Zhuyishixiang;
    }

    public void setGd2Zhuyishixiang(String gd2Zhuyishixiang) {
        this.gd2Zhuyishixiang = gd2Zhuyishixiang;
    }

    @ManyToOne
    @JoinColumn(name = "dept_id", referencedColumnName = "dept_id")
    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    @Basic
    @Column(name = "gd2_zhuangtai", nullable = true, length = 200)
    public String getGd2Zhuangtai() {
        return gd2Zhuangtai;
    }

    public void setGd2Zhuangtai(String gd2Zhuangtai) {
        this.gd2Zhuangtai = gd2Zhuangtai;
    }

    @Basic
    @Column(name = "gd2_beizhu", nullable = true, length = 200)
    public String getGd2Beizhu() {
        return gd2Beizhu;
    }

    public void setGd2Beizhu(String gd2Beizhu) {
        this.gd2Beizhu = gd2Beizhu;
    }

    @OneToMany(mappedBy="wxgdtuihuan")
    public List<Wxgdtuihuanxiangqin> getWxgdtuihuanxiangqinList() {
        return wxgdtuihuanxiangqinList;
    }

    public void setWxgdtuihuanxiangqinList(List<Wxgdtuihuanxiangqin> wxgdtuihuanxiangqinList) {
        this.wxgdtuihuanxiangqinList = wxgdtuihuanxiangqinList;
    }
}
